<?php
/**
 * Created by PhpStorm.
 * User: henryxi-mac
 * Date: 2015/5/20
 * Time: 17:15
 */
error_reporting(E_ALL & ~E_NOTICE);
require_once dirname(__FILE__)."/lib/common.php";
require_once dirname(__FILE__)."/config.php";
global $db_config;
$db = new Mysql($db_config);


$sql = "select VerifyTicket from authorize where appid = 'wxb015f10e8910a848' order by id desc limit 1";
$ret = $db->sql($sql);
$ticket = $ret[0]['VerifyTicket'];
file_put_contents("ticket",$ticket);